<div id="edit_group">
	<form action="" method="post" class="tf_form" id="edit_group_form">
		<input type="hidden" name="id" value="{@pp:id}" />
		<input type="hidden" name="action" value="edit_group" />
		<h1>Datengruppe bearbeiten</h1>
		<div class="h_sep" id="admin_top_hr" style="margin: 5px 0px 10px 0px;">
			<span class="left">&nbsp;</span>
			<span class="right">&nbsp;</span>
			<span class="center">&nbsp;</span>
		</div>
		<div class="tf_form_block" style="position: absolute; left: 550px;">
			&nbsp;
		</div>
		<div class="tf_form_block">
			<p>
				<span class="tf_label">Id:</span>
				<span style="padding-top: 5px; display: inline-block;">{@pp:id}</span>
			</p>
			
			<p>
				<label for="ef_name" class="tf_label">Name:</label>
				<input type="text" id="ef_name" name="ef_name" value="{@pp:name}" class="tf_input middle"/>
			</p>
			<p>
				<label for="ef_desc" class="tf_label">Beschreibung:</label>
				<textarea id="ef_desc" name="ef_desc" class="tf_input middle" rows="5">{@pp:desc}</textarea>
			</p>
				<p>
					<span class="tf_label">&nbsp;</span>
					<button class="button small" type=""><span>Speichern</span></button>
					<button class="button small" onclick="unsetAdressPath(new Array('action', 'id'));return false;"><span>Abbrechen</span></button>
				</p>
		</div>
	</form>
	<br />
	<h1>Daten <span class="small">Vorschau</span></h1>
	<div id="edit_datagroup_data">
		<div class="datagroup addDataGroup" id="addDataGroup_top" style="margin-bottom: -5px; margin-top: 3px;">
			<a href="javascript: void(0);" onclick="setAdressPathKeys(new Array('chapter', 'action'),new Array('data', 'new'))"><img src="{@pp:abs_root}{@pp:tpl_folder}/img/services/eFiling/actions/add.png" class="icon"/>Neue Eingabedaten hinzuf&uuml;gen</a>
		</div>
		<div class="h_sep_down" id="admin_top_hr" style="margin: 13px -5px 10px -5px;">
			<span class="left">&nbsp;</span>
			<span class="right">&nbsp;</span>
			<span class="center">&nbsp;</span>
		</div>
		<div class="tf_form">
		<div class="tf_form_block">
			<pp:dynamic name="data">
				<div class="ef_data">
					<div class="data_action">
						<div class="actions">
							<span class="move">
								<pp:dynamic name="notTop"><a href="javascript:void(0);" onclick="move({@pp:id}, {@pp:newOrder});"><img src="{@pp:abs_root}{@pp:tpl_folder}/img/services/eFiling/actions/move_up.png" class="icon" alt=" Hinauf bewegen" title=" Hinauf bewegen"/></a></pp:dynamic>
								<pp:dynamic name="Top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</pp:dynamic>
								<pp:dynamic name="notBottom"><a href="javascript:void(0);" onclick="move({@pp:id}, {@pp:newOrder});"><img src="{@pp:abs_root}{@pp:tpl_folder}/img/services/eFiling/actions/move_down.png" class="icon" alt="Hinunter bewegen" title="Hinunter bewegen"/></a></pp:dynamic>
							</span>
							<a href="javascript:void(0);" onclick="setAdressPathKeys(new Array('chapter', 'action', 'did'),new Array('data', 'edit', '{@pp:id}'));"><img src="{@pp:abs_root}{@pp:tpl_folder}/img/services/eFiling/actions/edit.png" class="icon"/></a>
							<a href="javascript:void(0);" onclick="removeData({@pp:id});"><img src="{@pp:abs_root}{@pp:tpl_folder}/img/services/eFiling/actions/delete.png" class="icon"/></a>
							
						</div>
					</div>
					<div class="data_group_blocker"></div>
					<pp:dynamic name="eFiling_dy_string">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<input type="text" id="tf[{@pp:id}]" name="tf[{@pp:id}]" value="" class="tf_input middle"/>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_soznr">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<input type="text" id="tf[{@pp:id}]" name="tf[{@pp:id}]" value="" class="tf_input small"/>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_email">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<input type="text" id="tf[{@pp:id}]" name="tf[{@pp:id}]" value="" class="tf_input small"/>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_int">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<input type="text" id="tf[{@pp:id}]" name="tf[{@pp:id}]" value="" class="tf_input small"/>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_text">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<span style="width: 500px; display: inline-block; padding-top: 5px;">{@pp:info}</span>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_textfield">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<textarea id="tf[{@pp:id}]" name="tf[{@pp:id}]" class="tf_input middle" rows="5">&nbsp;</textarea>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_check">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<input type="checkbox" id="tf[{@pp:id}]" name="tf[{@pp:id}]" value="" class="" style="padding-top: 5px; display: inline-block;"/><span>&nbsp;</span>
						</p>
					</pp:dynamic>
					<pp:dynamic name="eFiling_dy_date">
						<p>
							<label class="tf_label" for="tf[{@pp:id}]">{@pp:name}:</label>
							<input type="text" id="tf[{@pp:id}]" name="tf[{@pp:id}]" value="" class="tf_input middle"/>
						</p>
					</pp:dynamic>
				</div>
			</pp:dynamic>
		</div>
		</div>
		<pp:dynamic name="noDatagroups">
			<div class="addDataGroup">
				<h3 style="color:#666; padding: 10px;">Noch keine Daten hinzugef&uuml;gt</h3>
			</div>
		</pp:dynamic>
	</div>
	<br /><br />
</div>
<script type="text/javascript">
	<!--
	$('#edit_form').ready(function () {
		$('#edit_form_form').attr('action', '../efiling/#!/chapter/group/page/'+active_page);//+'/action/edit/id/'+active_id);
	});
	
	/**
	 * removes Group from Form 
	 */
	function removeData(id){
		showAdminLoadingDiv();
		getService('eFiling', 'admin', 'args[action]=deleteData&args[id]='+id+'&args[noMsg]=true', 
				function (msg) {
					window.setTimeout('location.reload()', 0);
				});
	}

	function move(id, newOrder){
		showAdminLoadingDiv();
		getService('eFiling', 'admin', 'args[action]=moveDataInGroup&args[id]='+id+'&args[order]='+newOrder+'&args[group]='+active_id+'&args[noMsg]=true', 
				function (msg) {
					window.setTimeout('location.reload()', 0);
				});
	}
	//-->
</script>